<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan= "http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
	<xsl:template match="/">
			<xsl:variable name="lang" select="/root/gui/language"/>
			<table border="0" width="60%" cellpadding="2" cellspacing="0">
						<xsl:choose>
							<xsl:when test="/root/request/id_element = 'id_group'">
							<tr>
								<td class="padded">
								<select style="width:300px" class="content" size="1" name="{/root/request/id_element}" id="{/root/request/id_element}" onchange="updateCategoryList('id_sub_group', 'sub_groups_div', this.value );" >
									<option value="" >- - Grupo  - - </option>
									<xsl:for-each select="/root/response/record">
										<option value="{id}">
											<xsl:if test="/root/request/id_selected=id">
												<xsl:attribute name="selected"/>
											</xsl:if>
											<xsl:value-of select="label/child::*[name() = $lang]"/>
										</option>
									</xsl:for-each>
								</select>
								</td>
							</tr>
							</xsl:when>
							<xsl:otherwise>
									<xsl:for-each select="/root/response/record">
											<tr>
												<td>	
												<xsl:value-of select="label/child::*[name() = $lang]"/>
												</td>
												<td>
												<input type="checkbox" name="_{id}" id="_{id}" value="_{id}"  />
												</td>
											</tr>
									</xsl:for-each>
							</xsl:otherwise>
						</xsl:choose>
					
			</table>
			
	</xsl:template>
</xsl:stylesheet>
